#include<stdio.h>
#include<stdlib.h>

typedef struct {
  long *t; // array containing fifo's members
  long *first;
  long *last;
} fifo;

fifo fifo_create(long size);

void fifo_add(fifo *f, long a);

long fifo_extract(fifo *f);

int fifo_empty(fifo *f); // 0: empty, 1: not empty

void fifo_clear(fifo *f); // clear fifo content
